<?php
/**
* Returns list of all directories to use
*/
$arSkip = array(
    ".svn", "Bugtracker", "CVS", "Forum", "installphars", "PEAR", "pear",
    "PHP", "XML_Annotea"
);

if ($argc <= 1) {
    die("Pass an argument\n");
}

$dir = $argv[1];
$arDirs = array();
foreach (glob($dir . '/*', GLOB_ONLYDIR) as $strDir) {
    $strDir = basename($strDir);
    if (!in_array($strDir, $arSkip)) {
        $arDirs[] = $strDir;
    }
}

echo implode(' ', $arDirs);
?>